#ifndef HOME_H
#define HOME_H

//#include "login.h"
#include "regist.h"
#include "top.h"
#include "list.h"
#include "luntan.h"
#include "myself.h"


#include <QMainWindow>
#include <QMessageBox>
#include <QHostAddress>
#include <QTcpSocket>
#include <QButtonGroup>

namespace Ui {
class Home;
}

class Home : public QMainWindow
{
    Q_OBJECT

public:
    explicit Home(QWidget *parent = nullptr);
    ~Home();
    static Home &getInstance();




public slots:
    void showConnect();

    void onLoginSuccess(QString name, int permission);

    void toList();

signals:
    void logout();

private slots:
    void onLogoutAction();

//    void on_regist_Pb_clicked();

//    void on_login_Pb_clicked();

private:
    Ui::Home *ui;

    QTcpSocket tcpsocket;


    QButtonGroup btnGroup;
    Top *top;
    Luntan *luntan;
    List *list;
    Myself *myself;


};

#endif // HOME_H
